package com.itheima.edu.info.manager.controller;

import com.itheima.edu.info.manager.domain.Student;
import com.itheima.edu.info.manager.service.StudentService;

import java.util.Scanner;

/**
 * Controller包用于客户接待,和用户打交道
 */
public class OtherStudentController extends BaseStudentController {


    private Scanner sc = new Scanner(System.in);



    /**
     * 键盘录入学生信息
     *  开闭原则:
     *
     * ​        对修改关闭,对扩展开放
     */
    @Override
    public Student inputStudentInfo(String id){
        System.out.println("请输入学生姓名:");
        String name = sc.next();
        System.out.println("请输入学生年龄:");
        String age = sc.next();
        System.out.println("请输入学生生日:");
        String birthday = sc.next();
        //将学生信息封装为学生对象
        Student stu = new Student(id,name,age,birthday);

        return stu;
    }
}

